<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateBrandsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('brands', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('title')->comment('品牌名称');
            $table->bigInteger('logo')->comment('品牌logo, 图片表的ID');
            $table->text('desc')->nullable()->comment('品牌描述');
            $table->string('url')->comment('品牌的网址');
            $table->integer('order')->default(0)->comment('品牌在前台页面的显示顺序,数字越大越靠后');
            $table->tinyInteger('if_show')->default(1)->comment('该品牌是否显示;0否1显示');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('brands');
    }
}
